home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 May / EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso / softwareupdate / system / amigados / amigadoslibrary / setioerr.c < prev    next >
C/C++ Source or Header  |  1996-10-10  |  605b  |  29 lines

  1. /* SetIoErr.c   V1.0   93-09-26                */
  2. /* ROM library: "dos.library/SetIoErr", (V36+) */
  3. /* Copyright 1993, Anders Bjerin, Amiga C Club */
  4.  
  5. #include <dos/dos.h>
  6.  
  7. #include <clib/dos_protos.h>
  8. #include <stdio.h>
  9. #include <stdlib.h>
  10.  
  11. UBYTE *version = "$VER: SetIoErr 1.0";
  12.  
  13. int main( int argc, char *argv[] );
  14. int main( int argc, char *argv[] )
  15. {
  16.   /* Store the "old" error code here: */
  17.   LONG old_error_code;
  18.  
  19.  
  20.   /* Set the global dos error code to 0: */
  21.   old_error_code = SetIoErr( 0 );
  22.  
  23.   /* Print the "old" error code: */
  24.   printf( "Old error code: %d\n", old_error_code );
  25.  
  26.   exit( 0 );
  27. }
  28.  
  29.